# import random
# import requests
#
# urls = [f'https://httpbin.org/get?value={random.randint(1,10)}'for _ in range(10)]
# requests_urls = set()
#
# for url in urls:
#     if url not in requests_urls:
#         requests_urls.add(url)
#         res = requests.get(url)
#         print(res.json())
#     else:
#         print("已请求过，重复操作")
import random
import json
import requests
import hashlib

url = 'https://httpbin.org/post'

datas = [{'id':101,'value':random.randint(1,10)} for i in range(10)]
res_data = set()
for data in datas:
    hash_data = hashlib.md5(json.dumps(data).encode('utf-8')).hexdigest()
    if hash_data in res_data:
        print("重复")
    else:
        res_data.add(hash_data)
        res = requests.post(url,data=data)
        print(res.json())

print(res_data)